package com.tzstcl.sys.quartz.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tzstcl.base.service.impl.BaseServiceImpl;
import com.tzstcl.sys.quartz.mapper.JobMapper;
import com.tzstcl.sys.quartz.model.Job;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 公司：天筑科技股份有限公司
 * 作者：zhugq
 * 日期：2018年09月20日
 * 说明：定时任务ServiceImpl
 */
@Service
public class JobServiceImpl extends BaseServiceImpl<JobMapper, Job> {


    /**
 * 分页查询
 *
 * @param var1
 * @return
 */
@Override
//@DataSource(value = DataSourceType.LOCAL)
@Transactional(readOnly = true, rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public PageInfo<Job> selectPage(Job var1) {
    PageHelper.startPage(var1.getPageNum(), var1.getPageSize());
    return PageInfo.of(mapper.select(var1));
}


}